Câu ví dụ
- thêm câu ví dụ: 1 2 3 4 5 6 7 8 9 10
- How did you test the copy constructor and the assignment operator?
Cách viết hàm dựng, copy constructor và assign operator(gán bằng)? - $str .= " "; # same thing with assignment operator
$str .= ” “; # cũng điều ấy với toán tử gán - >= Right shift AND assignment operator C >>= 2 is same as C = C >> 2
>= Toán tử dịch phải C >>= 2 is same as C = C >> 2 - Right shift AND assignment operator Example: C >>= 2 is same as C = C >> 2
>= Toán tử dịch phải C >>= 2 is same as C = C >> 2 - From C++11 on, an object has 2 extra special member functions: the move constructor and move assignment.
C++ giới thiệu 2 member function: move constructor và move assignment operator.